Matthias Clasen [Thu, 9 Jan 2020 05:50:33 +0000 (00:50 -0500)]
dragicon: Add docs
Matthias Clasen [Thu, 9 Jan 2020 05:31:13 +0000 (00:31 -0500)]
docs: Fix a typo
Matthias Clasen [Thu, 9 Jan 2020 05:30:41 +0000 (00:30 -0500)]
Properly export GtkDragIcon
The get_type function was missing.
Matthias Clasen [Wed, 8 Jan 2020 22:07:30 +0000 (17:07 -0500)]
Update all users
Matthias Clasen [Wed, 8 Jan 2020 21:43:52 +0000 (16:43 -0500)]
dragdest: Rename ::drag-motion to ::accept
Matthias Clasen [Wed, 8 Jan 2020 21:30:44 +0000 (16:30 -0500)]
dragdest: Allow denying drops asynchronously
Add an api to deny a drop, this is meant to be used
when delaying the decision on whether to accept a
drop until after reading the data.
Matthias Clasen [Wed, 8 Jan 2020 21:08:26 +0000 (16:08 -0500)]
remove debug spew
Matthias Clasen [Wed, 8 Jan 2020 21:06:57 +0000 (16:06 -0500)]
dragdest: Add a ::drag-enter signal
Mainly for symmetry with ::drag-leave.
Matthias Clasen [Wed, 8 Jan 2020 20:59:38 +0000 (15:59 -0500)]
testdnd2: Fix the text case
We must take mime types into account when checking.
Matthias Clasen [Wed, 8 Jan 2020 20:58:52 +0000 (15:58 -0500)]
content provider impl: Take mime types into account
Matthias Clasen [Wed, 8 Jan 2020 05:25:51 +0000 (00:25 -0500)]
dragdest: Steps towards allowing nested drop sites
Matthias Clasen [Wed, 8 Jan 2020 15:34:56 +0000 (10:34 -0500)]
Add another dnd testcase
This one tests nested drop sites and interaction between
DND and other gestures.
Matthias Clasen [Wed, 8 Jan 2020 04:31:48 +0000 (23:31 -0500)]
Update all callers
Matthias Clasen [Wed, 8 Jan 2020 04:45:27 +0000 (23:45 -0500)]
Add GdkDrop back to signal signatures
Matthias Clasen [Wed, 8 Jan 2020 00:20:32 +0000 (19:20 -0500)]
Drop gtk_drag_(un)highlight
Matthias Clasen [Wed, 8 Jan 2020 00:12:40 +0000 (19:12 -0500)]
filechooser: Remove code for sidebar pre-arming
This is just not a feature we can support currently.
Doing it properly would require infrastructure for
a generalized :drag(sensitive) state highlighting
potential drag sites everywhere.
Matthias Clasen [Tue, 7 Jan 2020 23:45:53 +0000 (18:45 -0500)]
listbox: Stop using gtk_drag_(un)highlight
This api is going away, so just do what needs to
be done manually.
Matthias Clasen [Tue, 7 Jan 2020 23:24:03 +0000 (18:24 -0500)]
calendar: Remove drag highlighting calls
This is happening unconditionally, anyway.
Matthias Clasen [Tue, 7 Jan 2020 23:19:06 +0000 (18:19 -0500)]
textview: Remove unnecessary drag highlighting
GTK does this unconditionally anyway, now.
Matthias Clasen [Tue, 7 Jan 2020 23:18:43 +0000 (18:18 -0500)]
text: Remove unnecessary drag highlighting
GTK does this unconditionally anyway, now.
Matthias Clasen [Tue, 7 Jan 2020 23:08:25 +0000 (18:08 -0500)]
notebook: Receive tab dnd on the tabs
Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.
Matthias Clasen [Tue, 7 Jan 2020 22:40:49 +0000 (17:40 -0500)]
Adwaita: No drag highlight for placessidebar
It does its own custom thing.
Matthias Clasen [Tue, 7 Jan 2020 22:30:08 +0000 (17:30 -0500)]
Adwaita: No dnd highlight for iconviews
We only want to highlight the drop location
that is rendered with a separate css node now.
Matthias Clasen [Tue, 7 Jan 2020 22:29:44 +0000 (17:29 -0500)]
iconview: Use a named subnode for dnd highlight
This is necessary because we want to style the
iconview itself and the item highlighting differently.
Matthias Clasen [Tue, 7 Jan 2020 22:13:32 +0000 (17:13 -0500)]
Adwaita: No dnd highlight for treeviews
We only want to highlight the drop location
that is rendered with a separate css node now.
Matthias Clasen [Tue, 7 Jan 2020 22:12:37 +0000 (17:12 -0500)]
treeview: Use a named subnode for dnd highlight
This is necessary because we want to style the
treeview itself and the row highlighting differently.
Matthias Clasen [Tue, 7 Jan 2020 21:16:05 +0000 (16:16 -0500)]
Adwaita: No drag highlight for stack switchers
Matthias Clasen [Tue, 7 Jan 2020 20:43:50 +0000 (15:43 -0500)]
Adwaita: No drag highlight for expanders
This is pretty ugly, because Adwaita has a very
generic drop-highlight implementaiton that we
need to overrule.
Matthias Clasen [Tue, 7 Jan 2020 20:39:19 +0000 (15:39 -0500)]
dragdest: Rename ::armed to ::contains
Matthias Clasen [Tue, 7 Jan 2020 19:48:09 +0000 (14:48 -0500)]
gtk-demo: Update the ::prepare handler
Matthias Clasen [Tue, 7 Jan 2020 19:46:11 +0000 (14:46 -0500)]
dragsource: Change the ::prepare return type
Make it return the content provider to use for
the next drag. This allows just-in-time provision
of the content provider. The default handler just
returns the value of the ::content property.
Matthias Clasen [Tue, 7 Jan 2020 07:15:22 +0000 (02:15 -0500)]
docs: Expand the GDK dnd docs
Matthias Clasen [Tue, 7 Jan 2020 06:50:41 +0000 (01:50 -0500)]
docs: Add GtkDragIcon
Matthias Clasen [Tue, 7 Jan 2020 06:48:15 +0000 (01:48 -0500)]
docs: Add GtkDropTarget section
Matthias Clasen [Tue, 7 Jan 2020 06:43:34 +0000 (01:43 -0500)]
docs: Remove dropped drag source apis
Matthias Clasen [Tue, 7 Jan 2020 06:42:28 +0000 (01:42 -0500)]
docs: Remove the dnd section
These functions in this section are all gone.
Matthias Clasen [Tue, 7 Jan 2020 06:40:44 +0000 (01:40 -0500)]
dragsource: Drop gtk_drag_source_drag_begin
No longer used. Also, minor cleanups all over.
Matthias Clasen [Tue, 7 Jan 2020 06:22:33 +0000 (01:22 -0500)]
dragksource: Small doc fix
Matthias Clasen [Tue, 7 Jan 2020 05:55:34 +0000 (00:55 -0500)]
Drop GTK content formats apis
These functions have been superseded by better
facilities in GDK.
Matthias Clasen [Tue, 7 Jan 2020 05:46:37 +0000 (00:46 -0500)]
testdnd2: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:46:20 +0000 (00:46 -0500)]
text: Use GDK content formats API
Matthias Clasen [Tue, 7 Jan 2020 05:46:00 +0000 (00:46 -0500)]
placessidebar: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:45:42 +0000 (00:45 -0500)]
filechooserwidget: Use GDK content formats api:
Matthias Clasen [Tue, 7 Jan 2020 05:45:29 +0000 (00:45 -0500)]
filechooserbutton: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:45:07 +0000 (00:45 -0500)]
calendar: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:44:50 +0000 (00:44 -0500)]
iconbrowser: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:44:19 +0000 (00:44 -0500)]
gtk-demo: Use GDK content formats api
Matthias Clasen [Tue, 7 Jan 2020 05:26:30 +0000 (00:26 -0500)]
text: Fix dragging of text across focus changes
When dragging selected text from an entry over a stackswitcher
to show a different page, the focus changes, causing the selection
to be lost; we should not lose the dragged content in this case.
Matthias Clasen [Tue, 7 Jan 2020 02:25:49 +0000 (21:25 -0500)]
Adwaita: Add drop highlight for iconview items
Matthias Clasen [Tue, 7 Jan 2020 02:25:15 +0000 (21:25 -0500)]
iconview: Render drop highlight properly
Use :drop(active) and render a frame, not focus.
Matthias Clasen [Tue, 7 Jan 2020 01:46:08 +0000 (20:46 -0500)]
dragsource: Fix cancellation
We need to properly end the drag.
Matthias Clasen [Tue, 7 Jan 2020 01:42:18 +0000 (20:42 -0500)]
filechooser: Stop using gtk_drag_source_get_drag
Matthias Clasen [Tue, 7 Jan 2020 01:31:23 +0000 (20:31 -0500)]
placessidebar: Update a comment
Matthias Clasen [Tue, 7 Jan 2020 01:30:41 +0000 (20:30 -0500)]
Remove an unused enum
We are not using GtkDragResult anymore.
Matthias Clasen [Tue, 7 Jan 2020 01:30:14 +0000 (20:30 -0500)]
testdnd2: Update to the api change in the previous commit
Matthias Clasen [Tue, 7 Jan 2020 01:29:42 +0000 (20:29 -0500)]
dragsource: Rename ::drag-failed to ::drag-cancel
This matches the names of the GdkDrag signals.
Matthias Clasen [Tue, 7 Jan 2020 01:21:00 +0000 (20:21 -0500)]
dragsource: Tweak docs more
Matthias Clasen [Tue, 7 Jan 2020 01:20:45 +0000 (20:20 -0500)]
dragsource: Document prepare
Matthias Clasen [Tue, 7 Jan 2020 01:09:47 +0000 (20:09 -0500)]
dragsource: Make ::prepare return a boolean
Make ::prepare return TRUE to start a drag.
The default handler simply checks that we
have a content provider and actions.
Matthias Clasen [Tue, 7 Jan 2020 01:03:24 +0000 (20:03 -0500)]
dragsource: Drop gtk_drag_get_source
Matthias Clasen [Tue, 7 Jan 2020 01:02:33 +0000 (20:02 -0500)]
notebook: Stop using gtk_drag_get_source
Matthias Clasen [Tue, 7 Jan 2020 00:55:43 +0000 (19:55 -0500)]
dragsource: Drop gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 00:54:52 +0000 (19:54 -0500)]
filechooserwidget: Stop using gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 00:51:46 +0000 (19:51 -0500)]
notebook: Stop using gtk_drag_source_get_origin
Matthias Clasen [Tue, 7 Jan 2020 06:13:51 +0000 (01:13 -0500)]
testtoolbar: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:13:35 +0000 (01:13 -0500)]
testlist3: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:13:11 +0000 (01:13 -0500)]
testdnd2: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:12:48 +0000 (01:12 -0500)]
testdnd: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:51 +0000 (01:08 -0500)]
pathbar: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:31 +0000 (01:08 -0500)]
notebook: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:08:11 +0000 (01:08 -0500)]
linkbutton: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:07:45 +0000 (01:07 -0500)]
colorswatch: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:07:24 +0000 (01:07 -0500)]
colorbutton: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:07:02 +0000 (01:07 -0500)]
iconbrowser: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 06:06:39 +0000 (01:06 -0500)]
gtk-demo: Use gtk_widget_add_controller for drag source
Matthias Clasen [Tue, 7 Jan 2020 00:38:17 +0000 (19:38 -0500)]
filechooserwidget: wip
Matthias Clasen [Tue, 7 Jan 2020 00:38:05 +0000 (19:38 -0500)]
treeview: Use gdk_drag_begin
Matthias Clasen [Tue, 7 Jan 2020 00:10:15 +0000 (19:10 -0500)]
iconview: Use gdk_drag_begin
This is a little more involved here.
Matthias Clasen [Mon, 6 Jan 2020 23:29:18 +0000 (18:29 -0500)]
Make GtkDragSource a gesture
Matthias Clasen [Mon, 6 Jan 2020 23:06:25 +0000 (18:06 -0500)]
notebook: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 22:50:04 +0000 (17:50 -0500)]
placessidebar: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 22:42:12 +0000 (17:42 -0500)]
textview: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 22:36:18 +0000 (17:36 -0500)]
entry: Use gdk_drag_begin
Use gdk_drag_begin for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 22:26:05 +0000 (17:26 -0500)]
text: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 21:12:18 +0000 (16:12 -0500)]
calendar: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 21:00:32 +0000 (16:00 -0500)]
label: Use gdk_drag_begin
Use gdk_drag_begin directly for one-off drags.
Matthias Clasen [Mon, 6 Jan 2020 21:00:17 +0000 (16:00 -0500)]
dragsource: Use public drag icon api
Matthias Clasen [Mon, 6 Jan 2020 20:47:25 +0000 (15:47 -0500)]
Make GtkDragIcon public
This is needed if we want to use gdk_drag_begin
for one-off drags, without a GtkDragSource.
Matthias Clasen [Mon, 6 Jan 2020 19:46:14 +0000 (14:46 -0500)]
dragsource: Reshuffle api a bit
Remove arguments from the constructor.
For actions, we now default to COPY, which is the most common one
that we should enable by default (MOVE requires handling deletion
on the the source side, and ASK only makes sense if we have
multiple actions).
For the content provider, we add a new ::prepare signal where
it should be provided just-in-time.
Matthias Clasen [Mon, 6 Jan 2020 18:28:25 +0000 (13:28 -0500)]
dragsource: Tweak api, update all callers
Add GdkDrag back to signals, drop ::drag-data-delete,
and replace it with a boolean in ::drag-end.
Carlos Garnacho [Sun, 5 Jan 2020 19:20:20 +0000 (20:20 +0100)]
gdk/x11: Forward suggested action (if any) to XdndStatus
Go ahead with the suggested action, so the drag source may update
cursor feedback properly, and eventually result in the correct
action.
Carlos Garnacho [Sun, 5 Jan 2020 19:17:38 +0000 (20:17 +0100)]
popover: Use g_signal_connect_object on parent widget signal
The popover may be destroyed, leaving this dangling signal. This
may cause crashes on future parent widget resizes.
Matthias Clasen [Mon, 6 Jan 2020 05:36:51 +0000 (00:36 -0500)]
Remove gtk_drop_target_get_target
Now that drop targets are event controllers,
we can just use gtk_event_controller_get_widget.
Update all callers.
Matthias Clasen [Mon, 6 Jan 2020 05:29:17 +0000 (00:29 -0500)]
Remove an unused signal
Matthias Clasen [Mon, 6 Jan 2020 05:29:02 +0000 (00:29 -0500)]
docs: Tweak GtkDropTarget docs
Matthias Clasen [Mon, 6 Jan 2020 05:21:41 +0000 (00:21 -0500)]
Move code over
Move remaining code from gtkdnd.c to gtkdragdest.c
and nuke gtkdnd.c and gtkdndprivate.h.
Matthias Clasen [Mon, 6 Jan 2020 05:12:21 +0000 (00:12 -0500)]
Replace gtk_drop_target_attach/detach
Since drop targets are now just event controller,
gtk_widget_add/remove_controller works just fine
for them.
Matthias Clasen [Mon, 6 Jan 2020 04:49:22 +0000 (23:49 -0500)]
Use normal event propagation for DND events
This works just fine, now that drop targets are
event controllers. There is only a very vestigial
gtk_drag_dest_handle_event() left that deals with
corner cases.
Matthias Clasen [Mon, 6 Jan 2020 04:09:26 +0000 (23:09 -0500)]
Get rid of GtkDragDestInfo
We can just attach the GtkDropTarget directly to
the GdkDrop.
Matthias Clasen [Mon, 6 Jan 2020 03:53:53 +0000 (22:53 -0500)]
Turn GtkDropTarget into an event controller
We are still propagating the drag events manually,
but we are now calling gtk_widget_run_controllers
to pass them to drop targets.